<template>
	<view class="open-box">
		<image class="name" src="../../../../static/image/opening-name.png" mode="widthFix"></image>
		<view class="content">
			<image class="animate" src="../../../../static/image/opening-box.png" mode="widthFix"></image>
		</view>
		<image class="bottom" src="../../../../static/image/opening-bottom.png" mode="widthFix"></image>
	</view>
</template>

<script>
	export default {
		data() {
			return {

			}
		},
		onLoad() {

		},
		methods: {

		}
	}
</script>

<style lang="scss" scoped>
	.open-box {
		width: 100%;
		height: 100vh;
		background: url(../../../../static/image/draw-result-bg.png);
		background-size: 100% 100%;
		overflow: hidden;
		box-sizing: border-box;
		display: flex;
		flex-direction: column;

		.name {
			width: 373rpx;
			height: 67rpx;
			display: block;
			margin: 201rpx auto 71rpx;
		}

		.content {
			flex: 1;
			display: flex;
			align-items: center;

			.animate {
				width: 366rpx;
				height: 366rpx;
				display: block;
				margin: 110rpx auto 0;
				-webkit-animation: vibrate-1 0.3s linear infinite both;
				animation: vibrate-1 0.3s linear infinite both;
			}

			@-webkit-keyframes vibrate-1 {
				0% {
					-webkit-transform: translate(0);
					transform: translate(0);
				}

				20% {
					-webkit-transform: translate(-5px, 5px);
					transform: translate(-5px, 5px);
				}

				40% {
					-webkit-transform: translate(-5px, -5px);
					transform: translate(-5px, -5px);
				}

				60% {
					-webkit-transform: translate(5px, 5px);
					transform: translate(5px, 5px);
				}

				80% {
					-webkit-transform: translate(5px, -5px);
					transform: translate(5px, -5px);
				}

				100% {
					-webkit-transform: translate(0);
					transform: translate(0);
				}
			}

			@keyframes vibrate-1 {
				0% {
					-webkit-transform: translate(0);
					transform: translate(0);
				}

				20% {
					-webkit-transform: translate(-5px, 5px);
					transform: translate(-5px, 5px);
				}

				40% {
					-webkit-transform: translate(-5px, -5px);
					transform: translate(-5px, -5px);
				}

				60% {
					-webkit-transform: translate(5px, 5px);
					transform: translate(5px, 5px);
				}

				80% {
					-webkit-transform: translate(5px, -5px);
					transform: translate(5px, -5px);
				}

				100% {
					-webkit-transform: translate(0);
					transform: translate(0);
				}
			}

		}

		.bottom {
			width: 100%;
			height: 435rpx;
			// position: fixed;
			// bottom: 0;
		}
	}
</style>
